package cn.five.stream.manager;

import android.hardware.Camera;

public class StreamingProfile {
	 private StreamingProfile.AVProfile avProfile;
	 private StreamingProfile.Stream stream;
	 private StreamingProfile.AudioProfile audioProfile;
	 private StreamingProfile.VideoProfile videoProfile;
	 
	   public StreamingProfile setAVProfile(StreamingProfile.AVProfile avProfile) {
	        this.avProfile = avProfile;
	        return this;
	    }
	   
	
	public StreamingProfile.AVProfile getAvProfile() {
		return avProfile;
	}

	public void setAvProfile(StreamingProfile.AVProfile avProfile) {
		this.avProfile = avProfile;
	}

	public StreamingProfile.Stream getStream() {
		return stream;
	}

	public void setStream(StreamingProfile.Stream stream) {
		this.stream = stream;
	}

	public StreamingProfile.AudioProfile getAudioProfile() {
		return audioProfile;
	}

	public void setAudioProfile(StreamingProfile.AudioProfile audioProfile) {
		this.audioProfile = audioProfile;
	}

	public StreamingProfile.VideoProfile getVideoProfile() {
		return videoProfile;
	}

	public void setVideoProfile(StreamingProfile.VideoProfile videoProfile) {
		this.videoProfile = videoProfile;
	}


	/**
	 * 流配置信息
	 * @author foxy
	 * 
	 *
	 */
	public static class Stream{
		private String url;		//
		private String key;
		public String getUrl() {
			return url;
		}
		public void setUrl(String url) {
			this.url = url;
		}
		public String getKey() {
			return key;
		}
		public void setKey(String key) {
			this.key = key;
		}
		/**
		 * 流配置信息
		 * @param url			//推流地址
		 * @param key			//推流的密钥
		 */
		public Stream(String url, String key) {
			this.url = url;
			this.key = key;
		}
		
	}
	/**
	 * 设置音频采样参数
	 * @author foxy
	 *
	 */
	public  static class AudioProfile{
		public int sampleRate=44100;		//采样率
        public int reqBitrate=128*1024;		//波特率
        /**
         * 音频采样参数构造函数
         * @param sampleRate		采样率 44100
         * @param reqBitrate		波特率 64*1024
         */
		public AudioProfile(int sampleRate, int reqBitrate) {
			this.sampleRate = sampleRate;
			this.reqBitrate = reqBitrate;
		}
        
	}
	/**
	 * 设置音频采集参数
	 * @author foxy
	 *
	 */
    public  static class VideoProfile {
        public int reqFps;
        public int reqBitrate;
        public int maxKeyFrameInterval=1;
        public int height=640 ;//360
        public int width=360;		//640
        public int face=Camera.CameraInfo.CAMERA_FACING_FRONT ;

        public VideoProfile(int var1, int var2) {
            this.reqFps = var1;
            this.reqBitrate = var2;
        }
        /**
         * 音频参数构造函数
         * @param reqFps		帧率 
         * @param reqBitrate	波特率
         * @param maxKeyFrameInterval	关键帧间隔
         */
        public VideoProfile(int reqFps, int reqBitrate, int maxKeyFrameInterval,int face) {
            this.reqFps = reqFps;
            this.reqBitrate = reqBitrate;
            this.maxKeyFrameInterval = maxKeyFrameInterval;
            this.face=face;
        }
    }
    
    public  class AVProfile {
        private StreamingProfile.VideoProfile mVideoProfile;
        private StreamingProfile.AudioProfile mAudioProfile;

        public AVProfile(StreamingProfile.VideoProfile var1, StreamingProfile.AudioProfile var2) {
            this.mVideoProfile = var1;
            this.mAudioProfile = var2;
        }
    }
    
    
	

}
